<?
include_once("accesscontrol.php");
include_once "index.php";

if(isset($_POST[s1]))
{
	$q1 = "update job_settings set 
					paypal = '$_POST[pp]',
                    adsense = '$_POST[adsense]',
					faq = '$_POST[faq]',
					about = '$_POST[about]',
					privacy = '$_POST[privacy]',
					counters = '$_POST[counters]',
					ContactEmail = '$_POST[ce]' ";
	mysql_query($q1) or die(mysql_error());
}

//get the settings
$q1 = "select * from job_settings";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);
?>


<br><br>
<form method=post>
<table align=center width=460 class=BlackLink>
<tr>
	<td width=200 align=right>Paypal.com email:</td>
	<td><input type=text name=pp value="<?=$a1[paypal]?>" size=45></td>
</tr>

<tr>
    <td width=200 align=right>Google Adsense ID:</td>
    <td><input type=text name=adsense value="<?=$a1[adsense]?>" size=50></td>
</tr>

<tr>
	<td width=200 align=right>Contacts email:</td>
	<td><input type=text name=ce value="<?=$a1[ContactEmail]?>" size=45></td>
</tr>

<tr>
	<td valign=top align=right>FAQs:</td>
	<td><textarea name=faq rows=4 cols=40><?=$a1[faq]?></textarea></td>
</tr>

<tr>
	<td valign=top align=right>About us:</td>
	<td><textarea name=about rows=4 cols=40><?=$a1[about]?></textarea></td>
</tr>

<tr>
	<td valign=top align=right>Privacy:</td>
	<td><textarea name=privacy rows=4 cols=40><?=$a1[privacy]?></textarea></td>
</tr>

<tr>
	<td align=right>Counters: </td>
	<td>
		<select name=counters>
			<option value="on" <? if($a1[counters] == "on") { echo "selected"; } ?>>On</option>
			<option value="off" <? if($a1[counters] == "off") { echo "selected"; } ?>>Off</option>
		</select>
	</td>
</tr>

<tr>
	<td></td>
	<td>
		<input type=submit name=s1 value="Update Settings">
	</td>
</tr>

</table>
</form>

<? include_once("../footer.php"); ?>